This simulation mode explores the capability of a computer to learn how to play Blackjack by using a popular theory called the Genetic Algorithm which is based on the principals of evolution and natural selection. In the animal kingdom, the ability of each animal to survive in their environment and prosper is influenced significantly by the animal’s genetic makeup. The animals that are the strongest will earn the right to mate and produce offspring. In this way the better genes are passed on to the next generation. And the offspring of two parents that are superior in their ability to survive, should also be superior. An important wildcard aspect of evolution is genetic mutation which allows children to have abilities their parents did not. Mutations in nature are genetic changes that occur from incorrect copying of the DNA code or from environmental factors like radiation. Some mutations can be an advantage if they help the animal survive while others can be a disadvantage that will die out.
Back to Blackjack. The program uses a population of 36 players, whose Blackjack DNA is the strategy information which tells them whether to take a card, stand, double down, split a pair, or take insurance. At the start this information is just randomly initialized. Or the user may choose to set this information themselves for the six players that produce the first generation.
To give each player an opportunity to prove themselves, six tables are played for the specified number of hands, with six players sitting at each. The best player at each table is selected to produce the next generation. By mating the six players with each other, a new generation of 36 players is obtained. The children’s playing strategy, or DNA, is created by each card combination being copied from one parent or the other, with a 50%, 50% chance for each. During this offspring production, mutations which are just random changes to the DNA code (or playing strategies) will occur. The user specifies a mutation rate in the dialog box as the number of changes per 1000 genes. You may wish to select a larger mutation rate at the beginning and then reduce it as the players are getting better.
Normally, the offspring will be a result of just the two parents and mutations, but if the user selects the Filter With Tally Statistics option, the results being tabulated in the tally statistics will be examined. If the tally statistics for a hand and dealer combination shows an advantage to a specific action after a sufficient number of entries (100), then the offspring DNA will be adjusted to this action. This will allow a mix of learning due to genetics and by trying various actions.
Like real evolution the genetic algorithm takes time. After each table is completed, the statistics are shown on the screen for the best player. You can keep tabs on progress by watching the ending balance to see if it is improving. Also the DNA of the best players can be monitored as they converge to the best strategy. Select “Show Best Player’s DNA” under the “Simulation” menu to examine the DNA of the best player at each table. The tables that have not yet been completed will not show any values. The program will run until stopped by the user selecting another simulation mode or to play Blackjack.